package com.ais.dao;

import com.ais.vo.SystemParm;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;
@Repository("systemParmDao")
public class SystemParmDao extends SqlMapClientDaoSupport{

    public SystemParmDao() {
        super();
    }

    public int deleteByPrimaryKey(Integer id) {
        SystemParm _key = new SystemParm();
        _key.setId(id);
        int rows = getSqlMapClientTemplate().delete("system_parm.deleteByPrimaryKey", _key);
        return rows;
    }

    public void insert(SystemParm record) {
        getSqlMapClientTemplate().insert("system_parm.insert", record);
    }

    public void insertSelective(SystemParm record) {
        getSqlMapClientTemplate().insert("system_parm.insertSelective", record);
    }

    public SystemParm selectByPrimaryKey(Integer id) {
        SystemParm _key = new SystemParm();
        _key.setId(id);
        SystemParm record = (SystemParm) getSqlMapClientTemplate().queryForObject("system_parm.selectByPrimaryKey", _key);
        return record;
    }

    public int updateByPrimaryKeySelective(SystemParm record) {
        int rows = getSqlMapClientTemplate().update("system_parm.updateByPrimaryKeySelective", record);
        return rows;
    }

    public int updateByPrimaryKey(SystemParm record) {
        int rows = getSqlMapClientTemplate().update("system_parm.updateByPrimaryKey", record);
        return rows;
    }
    
    public SystemParm selectByName(String name) {
        SystemParm record = (SystemParm) getSqlMapClientTemplate().queryForObject("system_parm.selectByName", name);
        return record;
    }
}